package com.ruoyi.caiwu.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.caiwu.mapper.AccountingVoucherSummaryMapper;
import com.ruoyi.caiwu.domain.AccountingVoucherSummary;
import com.ruoyi.caiwu.service.IAccountingVoucherSummaryService;

/**
 * 凭证常用摘要Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-25
 */
@Service
public class AccountingVoucherSummaryServiceImpl implements IAccountingVoucherSummaryService
{
    @Autowired
    private AccountingVoucherSummaryMapper accountingVoucherSummaryMapper;

    /**
     * 查询凭证常用摘要
     *
     * @param summaryId 凭证常用摘要主键
     * @return 凭证常用摘要
     */
    @Override
    public AccountingVoucherSummary selectAccountingVoucherSummaryBySummaryId(Long summaryId)
    {
        return accountingVoucherSummaryMapper.selectAccountingVoucherSummaryBySummaryId(summaryId);
    }

    /**
     * 查询凭证常用摘要列表
     *
     * @param accountingVoucherSummary 凭证常用摘要
     * @return 凭证常用摘要
     */
    @Override
    public List<AccountingVoucherSummary> selectAccountingVoucherSummaryList(AccountingVoucherSummary accountingVoucherSummary)
    {
        return accountingVoucherSummaryMapper.selectAccountingVoucherSummaryList(accountingVoucherSummary);
    }

    /**
     * 新增凭证常用摘要
     *
     * @param accountingVoucherSummary 凭证常用摘要
     * @return 结果
     */
    @Override
    public int insertAccountingVoucherSummary(AccountingVoucherSummary accountingVoucherSummary)
    {
        return accountingVoucherSummaryMapper.insertAccountingVoucherSummary(accountingVoucherSummary);
    }

    /**
     * 修改凭证常用摘要
     *
     * @param accountingVoucherSummary 凭证常用摘要
     * @return 结果
     */
    @Override
    public int updateAccountingVoucherSummary(AccountingVoucherSummary accountingVoucherSummary)
    {
        return accountingVoucherSummaryMapper.updateAccountingVoucherSummary(accountingVoucherSummary);
    }

    /**
     * 批量删除凭证常用摘要
     *
     * @param summaryIds 需要删除的凭证常用摘要主键
     * @return 结果
     */
    @Override
    public int deleteAccountingVoucherSummaryBySummaryIds(Long[] summaryIds)
    {
        return accountingVoucherSummaryMapper.deleteAccountingVoucherSummaryBySummaryIds(summaryIds);
    }

    /**
     * 删除凭证常用摘要信息
     *
     * @param summaryId 凭证常用摘要主键
     * @return 结果
     */
    @Override
    public int deleteAccountingVoucherSummaryBySummaryId(Long summaryId)
    {
        return accountingVoucherSummaryMapper.deleteAccountingVoucherSummaryBySummaryId(summaryId);
    }
}
